@extends('admin.formLayout')
@if(isset($id))
@section('title','修改设备')
@section('barName','修改设备')
    @else
        @section('title','增加设备')
        @section('barName','增加设备')
    @endif

@section('content')
<form class="layui-form" @if(isset($id)) action="" @else action="{{route('admin.device_store')}}" @endif method="post">
    {{csrf_field()}}
    @if(isset($id))
 <input type="hidden" name="id" value="{{$id}}">
    @endif
    <div class="layui-form-item">
        <label class="layui-form-label">设置备注信息</label>
        <div class="layui-input-block">
            <input type="text" name="comment" lay-verify="required"  value="{{$model->comment or ''}}" autocomplete="off" placeholder="描述设备的具体位置或用途，以便于设备的管理和搜索" class="layui-input">
        </div>
    </div>
<div class="layui-form-item">
        <label class="layui-form-label">申请设备数量</label>
        <div class="layui-input-block">
            <input type="number" name="quantity" lay-verify="required"  value="{{$model->comment or 1}}" autocomplete="off" placeholder="一个设备可覆盖100-300平方米" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">申请理由</label>
        <div class="layui-input-block">
            <textarea name="apply_reason" placeholder="请输入申请理由" class="layui-textarea"></textarea>
        </div>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="form">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="location.href='{{route('admin.device')}}'">返回</button>

        </div>
    </div>
</form>
@endsection